package com.zxy.controlcenter.modular.system.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 系统操作记录表
 * </p>
 *
 * @author 周徐阳
 * @since 2019-09-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("cc_operation_log")
@ApiModel(value = "OperationLog对象", description = "系统操作记录表")
public class OperationLog extends Model<OperationLog> {

    private static final long serialVersionUID = -7674948058975523409L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "日志类型 对应cc_dictionary")
    @TableField("log_type")
    private Long logType;

    @ApiModelProperty(value = "日志名称")
    @TableField("log_name")
    private String logName;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "类名")
    @TableField("class_name")
    private String className;

    @ApiModelProperty(value = "方法名")
    @TableField("method")
    private String method;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Long createTime;

    @ApiModelProperty(value = "是否成功")
    @TableField("status_code")
    private String statusCode;

    @ApiModelProperty(value = "信息")
    @TableField("message")
    private String message;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
